/**
 * @author gao
 * @date 2025/6/15 22:38
 */

public class Demo1 {
// 定义一个静态内部类MyThread，继承自Thread类
     static class MyThread extends Thread {
         // 重写run方法
         @Override
         public void run() {
             System.out.println("hello thread");
         }
     }

    public static void main(String[] args) {
        // 创建一个MyThread对象
        Thread thread = new MyThread();
        thread.start();
        thread.run();
    }
}